import request from '../../utils/request.js'
const state={
	cateDataList:[],//分类数据
}
const mutations={
	//修改分类数据
	changeCateDataListMutations(state,cateData){
		state.cateDataList=cateData
	}
}
const actions={
	//发送网络请求 拿分类数据
	async getCateDataListActions({commit}){
		//1.执行异步请求
		const res=await request('/getIndexCateList');
		console.log(res.indexCateList)
		//2.触发mutation
		commit('changeCateDataListMutations',res.indexCateList)
	}
	
}
const getters={ 
	
}
export default {
	namespaced:true,
	state,
	mutations,
	actions,
	getters
}